import request from '@/utils/request'

// api地址
const apiUri = {
  getMember: 'member/getMember',  //获取会员信息
  updateIntegral: 'member/updateIntegral',  //修改会员积分值
  integralHistory: 'member/integralHistory',  //积分变动历史
  addIntegral: 'member/addIntegral',  //增加积分
  getOrder: 'member/getOrder',  //获取订单列表
  getAgreement: 'setting/getAgreement',  //获取积分规则
  getShopList: 'store_shop/list',  //获取门店列表
  getLogPound: 'signin_log/pound',  //签到榜接口
  getMonth: 'signin_log/getMonth',  //签到页面月
  getWeek: 'signin_log/getWeek',  //签到页面周
  getSign: 'signin_log/sign',  //签到
  recommendAdd: 'recommend/add',  //推荐人
  logShare: 'signin_log/sharing',  //分享
  changeAvatar: 'user/changeAvatar',
}


// 获取会员信息
export const getMember = (param) => {
  return request.get(apiUri.getMember, param)
}


// 修改会员积分值
export const updateIntegral = (param) => {
  return request.get(apiUri.updateIntegral, param)
}


// 积分变动历史
export const integralHistory = (param) => {
  return request.get(apiUri.integralHistory, param)
}


// 增加积分
export const addIntegral = (param) => {
  return request.get(apiUri.addIntegral, param)
}


// 获取订单列表
export const getOrder = (param) => {
  return request.get(apiUri.getOrder, param)
}

// 获取积分规则
export const getAgreement = (param) => {
  return request.get(apiUri.getAgreement, param)
}

// 获取积分规则
export const getShopList = (param) => {
  return request.get(apiUri.getShopList, param)
}

// 获取签到榜
export const getLogPound = (param) => {
  return request.get(apiUri.getLogPound, param)
}
// 获取签到月
export const getMonth = (param) => {
  return request.get(apiUri.getMonth, param)
}
// 获取签到周
export const getWeek = (param) => {
  return request.get(apiUri.getWeek, param)
}
// 签到
export const getSign = (param) => {
  return request.get(apiUri.getSign, param)
}

// 推荐人
export const recommendAdd = (param) => {
  return request.get(apiUri.recommendAdd, param)
}
// 分享
export const logShare = (param) => {
  return request.get(apiUri.logShare, param)
}
// 上传图片
export const changeAvatar = (param) => {
  return request.get(apiUri.changeAvatar, param)
}